package com.holly.unit.system.modular.loginlog.times;

import com.holly.unit.system.modular.loginlog.service.SysLoginLogService;
import com.holly.unit.timer.api.TimerAction;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@Component
public class SysLoginLogTimer implements TimerAction {

    @Resource
    private SysLoginLogService sysLoginLogService;

    @Override
    public void action(String params) {
        if(params!=null && params!=""){
            Integer day=Integer.parseInt(params);
            sysLoginLogService.delAll(day);
        }
    }
}
